var mongoose = require('mongoose');
var db = mongoose.createConnection('mongodb://localhost:27017');

db.once('error', console.error.bind(console, 'connection error:'));
db.once('open', function(){
    console.info('数据库pim打开成功！')
});

module.exports = db;